package xian.woniuxy.be.config;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import xian.woniuxy.be.entity.ResultVO;

/**
 * @author ljy
 * @time 2022/01/03 14:50:25
 */
@ControllerAdvice
public class MyControllerAdvice {
    @ExceptionHandler
    @ResponseBody
    public ResultVO handle(Exception e){
        e.printStackTrace();
        return ResultVO.failure(e.toString());
    }
}
